$('.post-audit').click(function(){
  var target = $(this);
  var url = $(this).attr('data-url');
  var status = target.attr('post-action-status');
    $.ajax({
      url: url,
      type: 'POST',
      data: {'status':status},
      dataType: 'json',
      cache: false,
      success: function(data) {
          if(data == null) {
          alert('Server error');
          return;
          }
          if(data.message != 'undefined') {
            alert(data.message);
            target.parent().parent().remove();
          }
      },
      error: function(xhr, status, error) {
          console.log(xhr);
          console.log(status);
          console.log(error);
      }
  })
})